package com.tourism.product.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.tourism.product.mapper.ProductReviewMapper;
import com.tourism.product.domain.ProductReview;
import com.tourism.product.service.IProductReviewService;

/**
 * 产品品论Service业务层处理
 * 
 * @author silenceEcho
 * @date 2025-04-13
 */
@Service
public class ProductReviewServiceImpl implements IProductReviewService 
{
    @Autowired
    private ProductReviewMapper productReviewMapper;

    /**
     * 查询产品品论
     * 
     * @param reviewId 产品品论主键
     * @return 产品品论
     */
    @Override
    public ProductReview selectProductReviewByReviewId(Long reviewId)
    {
        return productReviewMapper.selectProductReviewByReviewId(reviewId);
    }

    /**
     * 查询产品品论列表
     * 
     * @param productReview 产品品论
     * @return 产品品论
     */
    @Override
    public List<ProductReview> selectProductReviewList(ProductReview productReview)
    {
        return productReviewMapper.selectProductReviewList(productReview);
    }

    /**
     * 新增产品品论
     * 
     * @param productReview 产品品论
     * @return 结果
     */
    @Override
    public int insertProductReview(ProductReview productReview)
    {
        return productReviewMapper.insertProductReview(productReview);
    }

    /**
     * 修改产品品论
     * 
     * @param productReview 产品品论
     * @return 结果
     */
    @Override
    public int updateProductReview(ProductReview productReview)
    {
        return productReviewMapper.updateProductReview(productReview);
    }

    /**
     * 批量删除产品品论
     * 
     * @param reviewIds 需要删除的产品品论主键
     * @return 结果
     */
    @Override
    public int deleteProductReviewByReviewIds(Long[] reviewIds)
    {
        return productReviewMapper.deleteProductReviewByReviewIds(reviewIds);
    }

    /**
     * 删除产品品论信息
     * 
     * @param reviewId 产品品论主键
     * @return 结果
     */
    @Override
    public int deleteProductReviewByReviewId(Long reviewId)
    {
        return productReviewMapper.deleteProductReviewByReviewId(reviewId);
    }
}
